<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="robots" content="noindex, follow"/>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/vendor.min.css">
    <link rel="stylesheet" href="css/plugins.min.css">
    <link rel="stylesheet" href="css/style.min.css">
    <style type="text/css">
        .product-add-action ul li a {
            width: 35px;
            height: 35px;
            line-height: 39px;
            background-color: white;
        }
        .product-add-action ul li:hover a {
            color: white;
            background-color: #006fb7;
            line-height: 39px;
        }
        .product-add-action ul li:not(:last-child) {
            margin-right: 0px;
        }
        .section-space-y-axis-100 {
            padding-top: 30px;
            padding-bottom: 100px;
        }
        .nav-item {
            margin-bottom: 5px;
            width: 350px;
        }
        .myaccount-tab-trigger{
            width: 350px;
        }
        .col-lg-9 {
            -ms-flex: 0 0 auto;
            width: 65%;
            margin-left: 80px;
        }
        .myaccount-tab-trigger li a{
            background: #1EB9EE;
            border-color: #1EB9EE;
            color: #fff;
        }
        .myaccount-tab-trigger li a.active {
            background: #006fb7;
            border-color: #006fb7;
            color: #fff;
        }
        .login-form .inputError{
            border-color: red;
        }
        .btn-secondary{
            background-color:#006fb7 ;
            border-color: #006fb7;
        }
        html{
            height: 100%;
            overflow-y: hidden;
        }
        body{
            height: 100%;
            overflow-y: auto;
        }
    </style>
</head>

<body>
<div class="main-wrapper">
    <div class="container">
        <div class="col-lg-8" style="margin: 20px auto">
            <div style="">请输入您的电子邮件地址。您将通过电子邮件收到一个创建新密码的链接。</div>
            <div >
                <div class="login-form">
                    <h4 class="login-title">|重置密码</h4>
                    <div class="row">
                        <div class="col-md-12">
                            <label>邮箱</label>
                            <input type="password" id="email" class="verify-NoEmpty">
                        </div>
                        <div class="col-md-6">
                            <label>验证码</label>
                            <div class="Image-size"><img src="" id="lostpswCode">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <label>输入验证码</label>
                            <input type="text" id="enroll-capicha" class="verify-NoEmpty">
                        </div>
                        <div class="col-12" style="margin-top: 10px;">
                            <button class="btn btn-custom-size lg-size btn-secondary btn-primary-hover rounded-0"
                                    onclick="enroll()">确定
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-area" style="position: absolute;bottom: 0;width: 100%;">
        <div class="footer-bottom py-3" data-bg-color="#1EB9EE">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="copyright">
                            <span class="copyright-text text-white">Copyright &copy; 2023.LAO Asia Unicom All rights reserved.</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a class="scroll-to-top" href="">
        <i class="fa fa-chevron-up"></i>
    </a>
</div>
<script src="layui/layui.js"></script>
<script src="js/vendor.min.js"></script>
<script src="js/plugins.min.js"></script>
<script src="js/main.min.js"></script>
<script src="js/config.js"></script>
<script src="js/token.js"></script>
<script src="js/jquery.i18n.min.js"></script>
<script src="js/multi_lang_config.js"></script>
</body>
<script>

    var layer = layui.layer;
    var form = layui.form;

    var moduleName = "shop";
    var defaultLang = layui.data('langTab').langType;
    initLangConfig({
        defaultLang:defaultLang,
        filePath: "js/i18n/"+moduleName+"/",
        module:moduleName,
        base:"js/"
    })
    var i18np = null;
    function changeLang(lang) {
        defaultLang = lang;
        reloadI18n({
            defaultLang:lang,
            filePath: "js/i18n/"+moduleName+"/",
            module:moduleName,
        })
        i18np.loadProperties(moduleName);
    }

    layui.config({base: 'js/'})
        // 继承treetable.js插件
        .extend({i18np: 'i18n'}).use([ 'i18np','jquery'], function () {
        i18np = layui.i18np;
        i18np.loadProperties(moduleName);
    });

    $(function () {
        $("#lostpswCode").attr("src",HOST+"webapi/tool/captcha?type=lostpsw&r="+Math.random());
    })
    // 设置密码
    function enroll() {
        var email=document.getElementById('email').value;
        var enroll_capicha=document.getElementById('enroll-capicha').value;
        if (email==""){
            document.getElementById("email").classList.add("inputError")
            return ;
        }else if (enroll_capicha==""||enroll_capicha==""){
            document.getElementById("email").classList.remove("inputError")
            document.getElementById("enroll-capicha").classList.add("inputError")
            return;
        }
        $("#enroll-capicha").removeClass('inputError');
        $.ajax({
            url:HOST+"webapi/userInfo/resetPsw",
            type:"post",
            data:{"email":email,"code":enroll_capicha},
            success:function (res) {
                if(res.code==200){
                    layer.msg("请进入邮箱设置新密码", {time: 1000}); return;
                    location.replace("storeindex.html")
                }else{
                    layer.msg("操作失败！",{icon:2});
                }
            }
        })
    }
</script>
</html>